package TemplateCode;

public class HandlerSpace extends Handler{

    @Override
    public String handleRequest(String textMessage) {

        System.out.println("处理空格");
        //去空格
        String result;
        result = textMessage.replace(" ","");

        if(nextHandler!=null){
            result = nextHandler.handleRequest(result);
        }
        return result;
    }
}
